﻿@model Angel.Web.Models.AddModel

@{
    ViewBag.Title = "Add User";
    Layout = "~/Views/Shared/_Layout.cshtml";
}
<html>
<head>
	<title>       
		Create New User            
	</title>
    <script src="@Url.Content("~/Scripts/jquery-1.4.4.min.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/jquery.json-2.2.min.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
</head>
<body> 
    <h1>@ViewBag.MessageErr</h1>
		<div class="aui-blanket"></div>
		<div  class="aui-popup box-shadow aui-dialog-open popup-width-medium aui-dialog-content-ready" style="width: 800px; margin-left: -420px; margin-top: -209.5px; ">
			<h2 class="aui-popup-heading"> Create New User </h2>
			<div class="aui-popup-content">
            @using (Html.BeginForm("Add", "User", FormMethod.Post, new { @class = "aui"}))
            {
					<div class="form-body">
						<div class="aui-message info">
							<p>There are currently @ViewBag.Users total user(s) set up in JIRA.</p>
						</div>
						<div class="field-group">
							<label for="user-create-username">Username<span style="color: Red">*</span></label>
                            @Html.TextBoxFor(u => u.UserName, new { @class = "text", id = "user-create-username" })
						    <span style="color:Red">@Html.ValidationMessageFor(u => u.UserName)</span>
                        </div>
						<div class="field-group">
							<label for="user-create-password">Password</label>
                            @Html.PasswordFor(u => u.Password, new { @class = "text", id = "user-create-password" })
							<div class="description">If you do not enter a password, one will be generated automatically.</div>
						</div>
						<div class="field-group">
							<label for="user-create-confirm">Confirm</label>
                            @Html.PasswordFor(ab => ab.ConfirmPassword, new { @class = "text", id = "user-create-confirm" }) 
						    <span style="color:Red"> @Html.ValidationMessageFor(u => u.ConfirmPassword)</span>
                        </div>
						<div class="field-group">
							<label for="user-create-fullname">Full Name<span style="color:Red">*</span></label> 
                             @Html.TextBoxFor(ab => ab.fullName, new { @class = "text", id = "user-create-fullname" }) 
						     <span style="color:Red">@Html.ValidationMessageFor(u => u.fullName)</span>
                        </div>
						<div class="field-group">
							<label for="user-create-email">Email<span style="color:Red">*</span></label>
                            @Html.TextBoxFor(ab => ab.Email, new { @class = "text", id = "user-create-email" })
						    <span style="color:Red">@Html.ValidationMessageFor(u => u.Email)</span>
                        </div>
						<div class="field-group checkbox">
							@Html.CheckBoxFor(u => u.sendNotify, new { @class = "checkbox", id = "user-create-sendEmail" })
                            <label for="user-create-sendEmail">Send Notification Email</label>	
							<div class="description">Send an email to the user you have just created, which will allow them to set up their password (if applicable).</div>
						</div>    
					</div>
					<div class="buttons-container form-footer">
						<div class="buttons"><span class="icon throbber"></span>
						<input type="submit" class="button" id="user-create-submit"  value="Create" />
                        @Html.ActionLink("Cancel", "Index", "User", new { @class = "cancel", id = "user-create-cancel" })
						</div>
					</div>
            }
			</div>
		</div>
	</body>
</html>











